cmake_minimum_required(VERSION 3.10)

set(PROJECT_NAME trtModelDeploy)
SET(CMAKE_BUILD_TYPE "Release")   #Release Debug

message(编译项目:${PROJECT_NAME})

project(${PROJECT_NAME} VERSION 0.1.0 LANGUAGES C CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/build)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
message(项目源目录:${PROJECT_SOURCE_DIR})

set(CUDA_INCLUDE_DIR /usr/local/cuda-11.4/targets/aarch64-linux/include)
set(CUDA_LIBRARY_DIR /usr/local/cuda-11.4/targets/aarch64-linux/lib)
link_directories(${CUDA_LIBRARY_DIR})
include_directories(${CUDA_INCLUDE_DIR})
link_libraries(cuda  cufft cudart  cublas curand  cudnn nvinfer nvonnxparser nvinfer_plugin  nvparsers)


add_executable(onnxToEngine main.cpp)